﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

using ZYO;

namespace SixYao
{
    public partial class FormMain : Form
    {
        public FormMain()
        {
            InitializeComponent();
        }

        private void FormMain_Load(object sender, EventArgs e)
        {
            this.comboBoxAsk.SelectedIndex = 1;
            //class六爻起卦 gua = new class六爻起卦(ZYO.Persistence.Obj.e起卦方法.摇卦, DateTime.Now, "012301", "事业");
            //ZYO.class六爻起卦 gua2 = new ZYO.class六爻起卦(ZYO.Persistence.Obj.e起卦方法.摇卦, DateTime.Now, "122231", "事业");
            //ZYO.class六爻起卦 gua3 = new ZYO.class六爻起卦(ZYO.Persistence.Obj.e起卦方法.摇卦, DateTime.Now, "111200", "求财");
            //ZYO.class六爻起卦 gua4 = new ZYO.class六爻起卦(ZYO.Persistence.Obj.e起卦方法.摇卦, DateTime.Now, "200000", "求财");
            //bool testall = true;
            //if (testall)
            //{
            //    for (int y1 = 0; y1 < 4; y1++)
            //    {
            //        for (int y2 = 0; y2 < 4; y2++)
            //        {
            //            for (int y3 = 0; y3 < 4; y3++)
            //            {
            //                for (int y4 = 0; y4 < 4; y4++)
            //                {
            //                    for (int y5 = 0; y5 < 4; y5++)
            //                    {
            //                        for (int y6 = 0; y6 < 4; y6++)
            //                        {
            //                            string guanumber = string.Format("{0}{1}{2}{3}{4}{5}", y1, y2, y3, y4, y5, y6);
            //                            ZYO.class六爻起卦 guaTest = new ZYO.class六爻起卦(ZYO.Persistence.Obj.e起卦方法.摇卦, DateTime.Now,
            //                                guanumber, "求财");

            //                            if (guaTest.Xml.符合的规则.Length > 0)
            //                            {
            //                                int i = 0;
            //                            }
            //                        }
            //                    }
            //                }
            //            }
            //        }
            //    }
            //}
        }

        private void buttonStart_Click(object sender, EventArgs e)
        {
            class六爻起卦 gua = new class六爻起卦(ZYO.Persistence.Obj.e起卦方法.摇卦,
                this.dateTimePicker1.Value,  textBox1.Text.Trim(), this.comboBoxAsk.Text);

            this.textBox2.Text = gua.Xml.文件.UI;
            //gua.Xml.文件.批注 = "line1 \r\n line2 &lt;br&gt; 3333";
            //ZYO.XmlHelper.Serialize2File(gua.Xml,@"d:\test\test.xml");

        }

        private void button1_Click(object sender, EventArgs e)
        {
            ZYO.DataFactory.GenerateDatabaseXml("d:\\zydb.xml");
        }

        private void comboBoxAsk_SelectedIndexChanged(object sender, EventArgs e)
        {

        }

        private void button2_Click(object sender, EventArgs e)
        {
            ZYO.class姓名 name = new class姓名("曾屹是杨红霞的老公");
            MessageBox.Show(name.Strokes.ToString());
        }
    }
}
